package com.huoyun.userAdmin.service;

import java.util.List;

import com.huoyun.userAdmin.bean.Address;
import com.huoyun.userAdmin.dao.AddressDao;

public class AddressServiceImpl implements AddressService 
{
	private AddressDao addressDao;
	
	@Override
	public long saveAddress(Address address) 
	{
		return addressDao.saveAddress(address);
	}

	@Override
	public List<Address> getAddressByUserId(long userId) 
	{
		return addressDao.getAddressByUserId(userId);
	}
	
	@Override
	public Address getAddressById(long addressId)
	{
		return addressDao.getAddressById(addressId);
	}

	@Override
	public void update(Address address) 
	{
		addressDao.update(address);
	}

	@Override
	public void delete(long id) 
	{
		addressDao.delete(id);
	}

	public AddressDao getAddressDao() {
		return addressDao;
	}

	public void setAddressDao(AddressDao addressDao) {
		this.addressDao = addressDao;
	}
	
}
